import { http } from "@/utils/http";
import { baseUrlApi } from "@/api/utils";

export const getAllList = params => {
  return http.request("get", "/business/average-user/agents", params);
};
// 列表
export function getPageList(params) {
  return http.request("get", baseUrlApi("business/average_user_merchants_deal_black/list"), { params });
}
export const submitData = (params: any) => {
  return http.request(params.id ? "put" : "post", `/business/average-user/${params.id ?? ""}`, {
    data: params
  });
};


// 删除
export const deleteData = (id: number) => {
  return http.request("delete", baseUrlApi(`business/average_user_merchants_deal_black/remove/${id}`));
};
// 新增
export const addData = (params: any) => {
  return http.request("post", baseUrlApi(`business/average_user_merchants_deal_black/add`),{
    data: params
  });
};